//
//  ZCLogisticsSetipCell.m
//  ZCJZ
//
//  Created by sujeking on 2019/3/7.
//  Copyright © 2019年 jeking. All rights reserved.
//

#import "ZCLogisticsSetipCell.h"
#import "generalToolBox.h"
#import <Masonry.h>

@implementation ZCLogisSetipView

- (void)awakeFromNib {
  [super awakeFromNib];
  [self setupSubViews];
}

- (void)setupSubViews {
  self.stview.layer.cornerRadius = CGRectGetHeight(self.stview.bounds) / 2;
  self.stview.layer.masksToBounds = YES;
}

@end


@interface ZCLogisticsSetipCell()

@property (weak, nonatomic) IBOutlet UIStackView *sview;
@property (weak, nonatomic) IBOutlet UILabel *fromcity;
@property (weak, nonatomic) IBOutlet UILabel *tocity;
@property (weak, nonatomic) IBOutlet UIImageView *checkImv;

@end

@implementation ZCLogisticsSetipCell

- (void)awakeFromNib {
  [super awakeFromNib];
  self.selectionStyle = UITableViewCellSelectionStyleNone;
  self.fromcity.hidden = YES;
  self.tocity.hidden = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  [super setSelected:selected animated:animated];
}

- (void)setStatus:(NSInteger)status {
  _status = status;
  ZCLogisSetipView *view = [self.sview viewWithTag:90 + status - 1];
  view.stview.backgroundColor = [generalToolBox getColorWithHexadecimalColorStr:@"0xC20114"];
  view.label.textColor = [generalToolBox getColorWithHexadecimalColorStr:@"0xC20114"];
  if (view == nil) {
    return;
  }
  [self.checkImv mas_updateConstraints:^(MASConstraintMaker *make) {
    make.centerX.mas_equalTo(view.mas_centerX).priorityLow();
  }];
}

@end
